
<?php

//  随机活动

$rand_list = array() ;
$result = $mysqli->query("select * from activity  order by rand() limit 8");
while($row =$result->fetch_array()){
    $rand_list[] = $row;
}
?>
<!-- footer -->
<script type="text/javascript">
		$(function(){

            $('form[name="form_submit"]').submit(function(){


                var name = $('#name').val();
                var password = $('#password').val();
                if(!name.length){
                    $('#name').focus();
                    return false ;
                }

                if(!password.length){
                    $('#password').focus();
                    return false ;
                }else{

                    if(password.length<7)
                    {
                        alert('密码长度必须6位以上');
                        return false ;
                    }

                }


            });
        })

</script>

	<div class="footer">
		<div class="container">
			<div class="soc">
				<div class="social">
					<ul>
						<li><a href="#"><i class="twter"> </i></a></li>
						<li><a href="#"><i class="facbk"> </i></a></li>
						<li><a href="#"><i class="dgg"> </i></a></li>
						<li><a href="#"><i class="rss1"> </i></a></li>
						<li><a href="#"><i class="flikr"> </i></a></li>
						<li><a href="#"><i class="lnkd"> </i></a></li>
						<li><a href="#"><i class="drible"> </i></a></li>
							<div class="clearfix"></div>	
					</ul>
				</div>
			</div>
			<div class="foot-bottom">
				<div class="col-md-4 flick">
					<h4>颇受欢迎的活动</h4>
						<ul>
                                <?php if(!empty($rand_list)&&isset($rand_list)):?>
                                    <?php foreach($rand_list as $val):?>
                                <li><a target="_blank" href="detail.php?id=<?php echo $val['id'];?>"><img src="<?php echo $val['cover']; ?>" width="104" height="96" alt="<?php echo $val['title']; ?>" /></a></li>
                                    <?php endforeach;?>
                                <?php endif;?>
						</ul>
				</div>
                <div class="col-md-4 flick1">

				</div>
                 <a name="login" id="login"></a>
                <?php if(!isset($_COOKIE['id'])):?>
                    <div class="col-md-4 flick">
					<h4>注册/登录</h4>
					<div class="flick-form_grid">
                        <form method="post" action="login.php" name="form_submit">
						 <input type="text" class="textbox"   name="Form[name]" id="name" placeholder="请输入用户名" >
						 <input type="password" class="textbox" name="Form[password]" id="password"  placeholder="请输入密码">
						 <div style=" overflow:hidden;">
                             <input type="submit" value="注册/登录" style="margin-top:20px;">
 						 </div>
					   </form>
			      </div>
				</div>
                <?php endif;?>
                <div class="clearfix"> </div>
			</div>
		</div>
	</div>
		<div class="footer-bottom">
		<div class="container">
			<div class="foot-left">
				<div class="foot-nav">
					<ul>
						<li <?php if($_SERVER['PHP_SELF']=='/index.php'):?>class="active"<?php endif;?>><a href="index.php">首页</a></li>
						<li <?php if($_SERVER['PHP_SELF']=='/contact.php'):?>class="active"<?php endif;?>><a href="contact.php">联系我们</a></li>
                        <div class="clearfix"></div>
					</ul>
					</div>					
				</div>
				<div class="foot-right">
					<p>Copyright &copy; 版权所有归交友天地</p>
				</div>
				<div class="clearfix"> </div>
			</div>
		</div>
<!-- footer -->
</body>
</html>

<?php $mysqli->close();?>